<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>

<%@ include file="../init_include.jsp" %>

<html>
<head>
<title><%=Language.getNameByCode("sys.sysop.dj.title","Add and Edit User")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=<%=Language.getHTMLLanguageStr()%>">
<link rel="stylesheet" href="../css.css" type="text/css">
<script Language="JavaScript" src="../script/Ion_Popup.js"></script> 
<script language="javascript">
	function checkForm() {
		if(window.formIon.newname.value=="") {
			alert("<%=Language.getNameByCode("sys.sysop.jsalertname","Please input username!")%>");
			window.formIon.newname.focus();
			return false;
		} 
		return true;
	}

</script>
</head>
<%
	int check_rst=Permission.accept(dbi,session,request,"sysop","tree","catid","000000100"); 	
	if (check_rst!=Permission.CHECK_RST_SUCCESS) {
		dbi.closeAll();
		if (check_rst==Permission.CHECK_RST_DENY)
			response.sendRedirect("../deny.html");
		else
			response.sendRedirect("../index.jsp");
		return;		
	}	
	int catid=0;
	if(request.getParameter("catid")!=null)
		catid=Integer.parseInt(request.getParameter("catid"));
	int id=0;
	if(request.getParameter("id")!=null)
		id=Integer.parseInt(request.getParameter("id"));
	Sysop sysop=Sysop.getSysop(dbi,id);
%>
<body class="bgcolor_title_tr">
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="input_title">
  <tr>
    <td><%=Language.getNameByCode("sys.sysop.changename","Change name to ...")%></td>
  </tr>
</table>
<hr>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#666666" width="90%">
	<form method="post" name="formIon" action="sysop_changename_1.jsp" onSubmit="return checkForm();">
  <tr class="bgcolor_title_tr"> 
    <td class="input_title" align="right"><%=Language.getNameByCode("sys.sysop.newname","New Username")%>:</td>
    <td><input type="text" name="newname" maxlength="60" size="30" value=""></td>
    <td><%=Language.getNameByCode("sys.sysop.oldname","Old Username")%>:</td>
    <td><%=sysop.getName()%><input type="hidden" name="oldname" value="<%=sysop.getName()%>"></td>
  </tr>
</table>
<input type="submit" name="Submit" value="<%=Language.getNameByCode("sys.Submit","Submit")%>">	
<input type="reset" name="Submit" value="<%=Language.getNameByCode("sys.Reset","Reset")%>">	
<input type="button" name="close" value="<%=Language.getNameByCode("sys.Close","Close")%>" onClick="closewindow();">	
<input type="hidden" name="catid" value="<%=catid%>">
</form>

</body>
</html>
<%@ include file="../init_free.jsp" %>